package com.toannv.gameController;

import com.toannv.extension.RoomExtension;

public class EndGame {
	public static boolean isFinish(int numberOfPlayer){
		if(numberOfPlayer==2){
			if(RoomExtension.CardOfUser0Push.size()==4&&RoomExtension.CardOfUser1Push.size()==4){
				return true;
			}
		}
		else if(numberOfPlayer==3){
			if(RoomExtension.CardOfUser0Push.size()==4&&RoomExtension.CardOfUser1Push.size()==4 && 
					RoomExtension.CardOfUser2Push.size()==4){
				return true;
			}
		}
		else if(RoomExtension.CardOfUser0Push.size()==4&&RoomExtension.CardOfUser1Push.size()==4 && 
				RoomExtension.CardOfUser2Push.size()==4 && RoomExtension.CardOfUser3Push.size()==4){
			return true;
		}
		return false;
	}
	
}
